//
//  UIWindow+Extension.m
//  黑马微博2期
//
//  Created by apple on 14-10-12.
//  Copyright (c) 2014年 heima. All rights reserved.
//

#import "UIWindow+Extension.h"
#import "KDTabBarController.h"
#import "KDNewfeatureController.h"

@implementation UIWindow (Extension)
- (void)switchRootViewController
{
    //NSUserDefaults
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    //读取数据
    NSString *str = [userDefaults stringForKey:@"Login"];
    //登录过
    if ([str isEqualToString:@"YES"]) {
         self.rootViewController = [[KDTabBarController alloc]init];
    }else
    {
        KDNewfeatureController *newCtrl = [[KDNewfeatureController alloc]init];
        self.rootViewController = newCtrl;
        
    }
 
   

}
@end
